﻿using DataProcess;
namespace BlackBoxForU.Feature
{
    class LuckDraw
    {
        static DataProcess.Lottery lottery;
        public static void Append(params ChoiseWords[] choises)
        {
            lottery = new Lottery(choises);
        }
        public static string SettingText
        {
            get
            {
                string text = "";
                int t = 0;
                foreach (var i in lottery.AllChoises)
                {
                    text += $"奖项：{i.Content} 可能性：{(lottery.GetItemPerCent(t++) * 100):N2}%\n";
                }
                return text;
            }
        }
        public static string Start()
        {

            return lottery.RandomGet().Content;
        }
    }
}